import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App.vue'
import router from './router'
// import axios from 'axios'
import axios from './utils/request'
// import VueAxios from 'vue-axios'
import '../mock/mockServer'
import './style/index.css'
// import AMap from 'vue-amap'
import dayjs from 'dayjs'
// 引入flexble
import 'lib-flexible'
import echarts from 'echarts'
import '../node_modules/echarts/map/js/china'

Vue.prototype.$echarts = echarts

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.prototype.$http = axios
// Vue.use(AMap)
Vue.filter('formateTime', function (val) {
  return dayjs(val).format('YYYY-MM-DD')
})

Vue.prototype.$eventBus = new Vue()
// 初始化vue-amap
// AMap.initAMapApiLoader({
//   // 高德key
//   // key: '4365df5e295713cc4d8dcbdcef934a0f',
//   key: '9db0f023652ad733edbbbb0510a9d5a3',
//   // 插件集合 （插件按需引入）
//   // plugin: ['AMap.Geolocation']
//   plugin: ['AMap.Geocoder', 'AMap.Geolocation', 'AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor']
// })

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
